package 集合.Comparable.Test01;

import java.util.TreeMap;
import java.util.TreeSet;

public class ComparableTest01 {
    public static void main(String[] args) {
        T t1 = new T(10);
        T t2 = new T(20);
        T t3 = new T(30);
        T t4 = new T(45);
        T t5 = new T(786);
        TreeSet<T> treeSet = new TreeSet();
        treeSet.add(t1);
        treeSet.add(t2);
        treeSet.add(t3);
        treeSet.add(t4);
        treeSet.add(t5);
        for (T t : treeSet){
            System.out.println(t);
        }

    }
}
